<style>
	.button-table{
		margin-top:10px;
		margin-left:26px;
	}
</style>
<link type="text/css" rel="stylesheet" href="<?php echo $this->config->item('plugin_path');?>popup/jquery.fancybox.css" />
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>popup/jquery.fancybox.js"></script>
<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default gradient">
			<div class="panel-heading">
				<h4>
					<span>Grid List Saran</span>
				</h4>
			</div>
			<div class="panel-body noPad clearfix">
				<table cellpadding="0" id="tabel" cellspacing="0" border="0" class="dynamicTable display table table-bordered" width="100%">
					<thead>
						<tr>
							<th><center>Kode</center></th>
							<th>Edit</th>
							<th>Nama</th>
							<th>No. Telepon</th>
							<th>Email</th>
							<th>Isi</th>
							<th>Media</th>
							<th>Tanggal</th>
							<th>Ijin</th>
							<th>No. UPTSA</th>
						</tr>
					</thead>
					<tbody>
						<?php foreach($data_list_saran as $row){?>
							<tr class="odd gradeX">
								<td><center><?php echo $row['KD_LIST_SARAN']?></center></td>
								<td>
									<div class="control center">
										<a href="javascript:edit(<?php echo $row["KD_LIST_SARAN"]; ?>)" title="Edit Data" class="tip"><span class="icon14 icomoon-icon-pencil"></span></a>
									</div>
								</td>
								<td><?php echo $row['NAMA'];?></td>
								<td><?php echo $row['NO_TELEPON'];?></td>
								<td><?php echo $row['EMAIL'];?></td>
								<td><?php echo $row['ISI'];?></td>
								<td><?php 
									if($row['MEDIA'] == 1){
										echo "LANGSUNG";
									}elseif($row['MEDIA'] == 2){
										echo "TELEPON";
									}elseif($row['MEDIA'] == 3){
										echo "EMAIL";
									}elseif($row['MEDIA'] == 4){
										echo "WEBSITE";
									}else{
										echo "-";
									}
								?></td>
								<td><?php echo date('d-m-Y', strtotime($row['TANGGAL']));?></td>
								<td><?php if($row['KD_IJIN'] != NULL){echo $row['NAMA_IJIN'];}else{ echo "-";}?></td>
								<td><?php if($row['NO_UPTSA'] != NULL){echo $row['NO_UPTSA'];}else{ echo "-";}?></td>
							</tr>
						<?php }?>
					</tbody>
				</table>
			</div>
			
		</div>
	</div>
</div>

<link href="<?php echo $this->config->item('plugin_path');?>tables/dataTables/jquery.dataTables.css" type="text/css" rel="stylesheet" />
<link href="<?php echo $this->config->item('plugin_path');?>tables/dataTables/TableTools.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/TableTools.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/ZeroClipboard.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/responsive-tables/responsive-tables.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('js_path');?>datatable.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>misc/nicescroll/jquery.nicescroll.min.js"></script>
<script>
var id_saran = 1;
function edit(id){
	document.location = "<?php echo site_url('pengaduan_saran/form_input_ps/')?>/"+id+"/"+id_saran;
}
</script>